using System;
using System.Threading;

namespace ebcpatterns.concurrent
{
    public class Asynchronizer<T> : IAsynchronizer<T>
    {
        public void Process(T input) {
            var thread = new Thread(() => Result(input));
            thread.Start();
        }

        public event Action<T> Result;
    }

    public class Asynchronizer : IAsynchronizer
    {
        public void Process() {
            var thread = new Thread(() => Result());
            thread.Start();
        }

        public event Action Result;
    }
}